<template>
  <SearchTablePage :search-config="baseTableSearchModel" :table-config="baseTableModel" />
</template>

<script lang="tsx" setup>
defineOptions({
  name: 'StoreInfoInBatchDetailPageData',   //全局别名
  title: '表格页',   //标题
});
// 接口
import StoreInfoInBatchDetailApi from '/@/api//StoreInfoInBatchDetailApi.ts';
const props = defineProps<{
  modelValue: {
    query: {
      storeId: any
      materialName: any
    }
  }
}>();

// 表格初始化Model

const baseTableModel = ref({
  border: true,
  pagination: true,
  inline: true,
  selectable: true,
  isFullscreen: false,
  tooltip: true,
  minWidth: '200px',
  data: {    //table  初始化
    current: 1,
    size: 10,
    total: 100,
    data: []
  },
  requestData: {
    api: StoreInfoInBatchDetailApi.getPageData, query: {
      storeId: props.modelValue.query.storeId,
      materialName: props.modelValue.query.materialName
    }
  },   //数据源 参数有效性： 'steady|transient'
  columns: [
    {
      label: "仓库类型",
      field: "storeType",
      width: 180,
    },
    {
      label: "原辅料编号",
      field: "materialCode",
      width: 180,
    },
    {
      label: "物料大类",
      field: "materialCategoryLevel1Name",
      width: 150,
    },
    {
      label: "物料亚类",
      field: "materialCategoryLevel2Name",
      width: 150,
    },
    {
      label: "物料细类",
      field: "materialCategoryLevel3Name",
      width: 150,
    },
    {
      label: "物料名称",
      field: "materialName",
      width: 180,
    },
    {
      label: "物料规格",
      field: "materialSpc",
      width: 180,
    },

    {
      label: "物料生产日期",
      field: "produceDate",
      width: 200,
      fieldFormat: "date"
    },
    {
      label: "物料保质期",
      field: "warrantyPeriod",
      width: 150,
    },

    {
      label: "物料储存条件",
      field: "storageCondition",
      width: 150,
    },
    {
      label: "物料储存地点",
      field: "storagePlace",
      width: 150,
    },

    {
      label: "库存数量",
      field: "num",
      width: 120,
    },

    {
      label: "库存数量单位",
      field: "numUnit",
      width: 120,
    },

    {
      label: "单价",
      field: "price",
      width: 180,
    },
    {
      label: "单价单位",
      field: "priceUnit",
      width: 180,
    },
    {
      label: "总价",
      field: "totalPrice",
      width: 150,
    },
    {
      label: "总价单位",
      field: "totalPriceUnit",
      width: 180,
    },
    {
      label: "制作食品名称",
      field: "produceFoodName",
      width: 150,
    },
    {
      label: "最大使用量",
      field: "maxUse",
      width: 180,
    },
    {
      label: "检测项目",
      field: "testItems",
      width: 180,
    },
    {
      label: "创建时间",
      field: "create_time",
      width: 200,
    },
    {
      label: "更新时间",
      field: "update_time",
      width: 200,
    },
  ],

})



onActivated(() => {
})



</script>
